
// 全组件挂载碎图
export const imgerror = {
  // inserted会自动触发
  inserted(el, bindings) {
    // el为当前挂载的元素
    // onerror为挂载点出错时才会触发
    el.onerror = function() {
      el.src = bindings.value
    }
  }
}

export const color = {
  inserted(el, bindings) {
    el.style.color = bindings.value
  }
}
